package com.hlhj.funlike_businessqzxd.moudle

import android.content.Context
import com.example.mymvp.mvp.BaseModule
import com.example.mymvp.okrx.BaseBean
import com.example.mymvp.okrx.LoadingConsum
import com.hlhj.funlike_businessqzxd.api.Apis
import com.hlhj.funlike_businessqzxd.api.BaseObser
import com.hlhj.funlike_businessqzxd.views.ChangePwdView
import com.lzy.okgo.model.Response

class ChangePwdModule :BaseModule {
    var lis:ChangePwdView?=null

    fun changeP(c:Context,old_pass:String,user_pass:String,user_reppass:String){
        Apis.changePwd(old_pass, user_pass, user_reppass)
                ?.let {
                    it.subscribe(object :BaseObser<Response<BaseBean>>(c){
                        override fun httpSuccess(t: Response<BaseBean>?) {
                            lis?.setChangeResult(t?.body()!!)
                        }
                    })
                }
    }
}